package com.project.class8_24.proxy.staticProxy;

public class MissLai implements IEat{
    private IEat iEat;
    public MissLai(IEat iEat){
        this.iEat = iEat;
    }

    @Override
    public void eat() {
        System.out.println("订餐");

        //调用目标对象的目标方法
        this.iEat.eat();

        System.out.println("结帐，开发票");
    }

    @Override
    public void drink() {
        System.out.println("订餐");
        this.iEat.drink();
        System.out.println("结帐，开发票");
    }
}
